<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Admin/News/index')}">新闻列表</a></li>
			<li class="active"><a href="{:U('Admin/News/pindex')}">采集新闻</a></li>
			<li><a href="{:U('Admin/News/add')}">添加新闻</a></li>
		</ul>
		<form class="well form-search" id="query_form" method="post" action="{:U('Admin/News/index')}">
			新闻标题： 
			<input type="text" name="name" style="width: 120px;" value="{$formParam.name}" placeholder="新闻标题...">
			新闻源：
			<select class="select_2" name="typeId" style="width: 90px;">
				<option value='-1'>全部</option>
				<foreach name="types" item="vo">
					<option value="{$vo.typeId}" <if condition="$formParam.typeId eq $vo.typeId"> selected </if>>{$vo.name}</option>
				</foreach>
				<option value="0">活动</option>
			</select>
			审核状态：
			<select class="select_2" name="typeId" style="width: 90px;">
				<option value='-1'>全部</option>
				<foreach name="types" item="vo">
					<option value="{$vo.typeId}" <if condition="$formParam.typeId eq $vo.typeId"> selected </if>>{$vo.name}</option>
				</foreach>
				<option value="0">活动</option>
			</select>
			<input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/Live/index')}" class="btn btn-primary" value="查询" />
		</form>
		<form class="js-ajax-form" action="" method="post">
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>新闻名称</th>
					<th>状态</th>
					<th>分类</th>
					<th>专题</th>
					<th>时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data" item="vo">
				<tr>
					<td>{$vo.name}</td>
					<td>{$vo.introduction}</td>
					<td><if condition="$vo.category eq 1">否</if>
					<if condition="$vo.category eq 2">是</if></td>
					<td>{$vo['endTime']/1000|date='Y-m-d H:i:s', ###}</td>
					<td>{$status[$vo['status']]}</td>
					<td>
						<a href='{:U("Admin/Live/edit",array("store_id"=>$vo["store_id"]))}'>编辑</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		
	});
	</script>
</body>
</html>